<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="UTF-8">
		<title>红酒会 - 智能红酒管家</title>
		<link rel="shortcut icon" type="image/x-icon" href="${ctx}/favicon.ico" />
		<link rel="stylesheet" href="http://libs.baidu.com/bootstrap/2.3.2/css/bootstrap.min.css" />
		<link rel="stylesheet" href="http://libs.baidu.com/bootstrap/2.3.2/css/bootstrap-responsive.min.css" />
		<link rel="stylesheet" href="${ctx}/static/styles/style.css" />
	</head>
<body>
	
	<c:import url="/header"></c:import>
	
	<div class="container" id="container">
		<div class="row">
		
			<!-- 菜单栏 -->
			<div class="span2">
				<c:import url="menu.jsp">
					<c:param name="menu">talk</c:param>
					<c:param name="userId">${id}</c:param>
				</c:import>
			</div>	
			
			<!-- 内容 -->
			<div class="span6">
				<div>
					<ul class="breadcrumb">
						<li><a href="${ctx}/user/${id}">用户中心</a> <span class="divider">/</span></li>
	  					<li class="active">酒说说</li>
					</ul>
				</div>
				<div>
					<c:forEach var="list" items="${list}">
						<p>
							<a href="${ctx}/talk/detail/${list.id}" target="_blank">${list.title}</a>
							<span class="gray pull-right">
								<fmt:formatDate value="${list.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
							</span>
						</p>
					</c:forEach>
				</div>
				
				<div class="pagination" style="text-align:center">
				  	<ul>
				  		<c:choose>
				  			<c:when test="${paging.pageIndex == 0}">
				  				<li class="disabled"><span>首页</span></li>
				  				<li class="disabled"><span>上一页</span></li>
				  			</c:when>
				  			<c:otherwise>
				  				<li><a href="${ctx}/user/${id}/talk?pageIndex=0">首页</a></li>
				  				<li><a href="${ctx}/user/${id}/talk?pageIndex=${paging.pageIndex - 1}">上一页</a></li>
				  			</c:otherwise>
				  		</c:choose>
				  		<c:choose>
				  			<c:when test="${paging.pageIndex == paging.pageCount - 1}">
				  				<li class="disabled"><span>下一页</span></li>
				  				<li class="disabled"><span>尾页</span></li>
				  			</c:when>
				  			<c:otherwise>
				  				<li><a href="${ctx}/user/${id}/talk?pageIndex=${paging.pageIndex + 1}">下一页</a></li>
				  				<li><a href="${ctx}/user/${id}/talk?pageIndex=${paging.pageCount - 1}">尾页</a></li>
				  			</c:otherwise>
				  		</c:choose>
					</ul>
				</div>
			</div>
			
			<!-- 侧栏 -->
			<div class="span4"><c:import url="/talk/right" /></div>
		</div>
	</div>
	
</body>
</html>